{include file="public/header" /}
</head>
<body>
<div class="panel admin-panel margin-top">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>修改分类</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="">
      <input type="hidden" name="cateid" value="{$cateone['cate_id']}">
    	<div class="form-group">
        <div class="label">
          <label>上级分类：</label>
        </div>
        <div class="field">
          <select name="parentid" class="input w50">
            <option value="0">请选择分类</option>
            {foreach $cate as $v}
            {if $v['parent_id']==0}
            <option value="{$v['cate_id']}">---{$v['cate_name']}</option>
            {foreach $cate as $vv}
            {if $vv['parent_id']==$v['cate_id']}
            <option {$cateone['parent_id']==$vv['cate_id']?'selected':''} value="{$vv['cate_id']}">-----{$vv['cate_name']}</option>
            {/if}
            {/foreach}
            {/if}
            {/foreach}
          </select>
          <div class="tips">不选择上级分类默认为一级分类</div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>分类标题：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="name" value="{$cateone['cate_name']}" />
          <div class="tips"></div>
        </div>
      </div>        
      <div class="form-group">
        <div class="label">
          <label>分类图片：</label>
        </div>
        <div class="field">
          <input type="text" data-image="images/logo.png" readonly id="url1" class="input tips" style="width:25%; float:left;" value="" data-toggle="hover" data-place="right" />
          <input type="button"  class="button bg-blue margin-left" id="image1" value="+ 浏览上传" >
          <input type="file" name="logo" onchange="url1.value=this.value" style="position:relative; z-index:1000px; filter:alpha(opacity=0);-moz-opacity:0; opacity:0; left:-155px;" />
        </div>
      </div>     
      <div class="form-group">
        <div class="label">
          <label>排序：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="sort" value="{$cateone['sort_order']}"  data-validate="number:排序必须为数字" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <input class="button bg-main icon-check-square-o" type="submit" name="come" value="提交并继续">
          <input class="button bg-main icon-check-square-o" type="submit" name="back" value="提交并返回">

        </div>
      </div>
    </form>
  </div>
</div>
</body></html>